feat(agent): vision (multimodal) input + OpenAI max_completion_tokens fix (v0.36.0-beta)#41
Merged
Merged
Conversation
…on_tokens fix (v0.36.0-beta)
Adapters can now carry images on a user turn (images:[{mime,data}]), rendered in each
provider's native format — Anthropic image blocks, OpenAI-compatible image_url parts,
Gemini inlineData. Text-only turns are unchanged (backward-compatible).
Tiger_Agent_Provider_Factory::supportsVision($provider,$model) reports capability,
conservatively (unknown => false) so callers fall back to a caption pass instead of
sending an image to a text-only model.
Also folds in the OpenAI max_completion_tokens fix: OpenAi overrides _maxTokensField()
so gpt-5 / o-series (which reject max_tokens) work.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds multimodal (vision) input to the AI provider adapters, plus the OpenAI
max_completion_tokensfix.Vision
userturn may carryimages: [{mime, data:<base64>}, …], rendered natively per provider:imagecontent blocksimage_urlcontent partsinlineDatapartsTiger_Agent_Provider_Factory::supportsVision($provider, $model)reports capability, conservatively (unknown ⇒false) so callers degrade to a caption/OCR pass rather than erroring against a text-only model.Fix
Tiger_Agent_Provider_OpenAinow sendsmax_completion_tokens(gpt-5 / o-series rejectmax_tokens); the base keepsmax_tokensvia an overridable_maxTokensField().Consumer
TigerRoundtable uses
supportsVision()to decide native image (all seats can see) vs a one-time caption pass (any text-only seat present).Testing
Verified live on tiger-dev: native image reading (Claude described a generated chart incl. a blue highlight) and the caption fallback (a DeepSeek seat flipped the room to caption mode). Vision heuristic unit-checked across providers. Adapters lint clean on PHP 8.1–8.5.
🤖 Generated with Claude Code